home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8722 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: news.lpr.carel.fi!usenet
  2. From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Turbo C to 80386 Assy Calling Problem
  5. Date: Tue, 05 Mar 1996 13:09:29 +0200
  6. Organization: Carelcomp Forest
  7. Message-ID: <313C20E9.6EE1@cmt.lpr.mail.carel.fi>
  8. References: <PUMPHREY.96Mar1172435@icarus.ERA.COM>
  9. NNTP-Posting-Host: renoir.cclahti.carel.fi
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (WinNT; I)
  14.  
  15. Mark Pumphrey wrote:
  16. > I am having a hard time building seperate objects from
  17. > assembler and c sources that can reference each other.
  18. > 1.  If I build using an object library, does not work...
  19. >     tasm get_cpx.asm, get_cpx.obj
  20. >     Turbo Assembler Version 1.01
  21. >     tlib libcc.lib -+ get_cpx.obj
  22. >     tlib 3.02
  23. >     tcc -v -lc -etest.exe test.c libcc.lib
  24. >     Turbo C++ version 1.01
  25. >     Error: Undefined symbol _get_cpx in module test.c
  26. > 2.  If I build all at once, does work...
  27. >     tcc -v -etest.exe test.c get_cpx.asm
  28. > 3.  Source code...
  29. >     #define DECLARATIONS
  30. >     #include <stdio.h>      /* used for debugging */
  31. >     #include "common.h"
  32. >     extern int get_cpx();
  33. >     main()
  34. >     {
  35. >         int i;
  36. >         i=get_cpx();
  37. >         printf("i=%d\n",i);
  38. >     }
  39. >                    .model small
  40. >                    .code
  41. >                    public _get_cpx
  42. >     _get_cpx proc
  43. >                    mov  ax,23
  44. >                    ret
  45. >                    _get_cpx endp
  46. >                    end
  47. > If anyone knows how to crack this puzzle, sure would
  48. > help.  I tried contacting Borland but just got ignored.
  49.  
  50. Tasm, by default, converts exported names to upper-case. Use a command-line flag to 
  51. disable this (type tasm or tasm -? for help).
  52.  
  53. HTH,
  54.  AriL
  55. -- 
  56. All my opinions are mine and mine alone.
  57.